package net.zjitc.servlet;

import javax.servlet.*;
import javax.servlet.annotation.WebServlet;
import java.io.IOException;
import java.util.Date;

/**
 * @Author Administrator
 * @Date 2020/5/14 14:07
 * Servlet，处理请求
 * 接口，实现抽象方法
 * servlet3.0之后可以使用注解配置：@WebServlet("/helloServlet")
 **/
@WebServlet("/helloServlet")
public class HelloServlet implements Servlet {

    @Override
    public void init(ServletConfig servletConfig) throws ServletException {
        System.out.println("init...");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public void service(ServletRequest servletRequest, ServletResponse servletResponse) throws ServletException, IOException {
        System.out.println("service...");


    }

    @Override
    public String getServletInfo() {
        return null;
    }

    @Override
    public void destroy() {
        System.out.println("destory...");
    }
}
